package com.exrobot.module.rbt.dal.mysql.robotoperationlog;

import java.util.*;

import com.exrobot.framework.common.pojo.PageResult;
import com.exrobot.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.exrobot.framework.mybatis.core.mapper.BaseMapperX;
import com.exrobot.module.rbt.dal.dataobject.robotoperationlog.RobotOperationLogDO;
import org.apache.ibatis.annotations.Mapper;
import com.exrobot.module.rbt.controller.admin.robotoperationlog.vo.*;

/**
 * 车辆运行日志 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface RobotOperationLogMapper extends BaseMapperX<RobotOperationLogDO> {

    default PageResult<RobotOperationLogDO> selectPage(RobotOperationLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RobotOperationLogDO>()
                .eqIfPresent(RobotOperationLogDO::getSn, reqVO.getSn())
                .eqIfPresent(RobotOperationLogDO::getType, reqVO.getType())
                .eqIfPresent(RobotOperationLogDO::getValue, reqVO.getValue())
                .eqIfPresent(RobotOperationLogDO::getTitle, reqVO.getTitle())
                .eqIfPresent(RobotOperationLogDO::getInfo, reqVO.getInfo())
                .eqIfPresent(RobotOperationLogDO::getStatus, reqVO.getStatus())
                .orderByDesc(RobotOperationLogDO::getId));
    }

}